package springboot.hello.helloSpringboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import springboot.hello.helloSpringboot.entity.Hoslist;
import springboot.hello.helloSpringboot.entity.Orlist;
import springboot.hello.helloSpringboot.service.OrlistService;

import javax.validation.Valid;

@Controller
public class PersonalController {
    @Autowired
    public PersonalService service;


    @RequestMapping("/personalPage")
    public String find(Model model,Model model1) {

        RegistrationForm registrationForm=service.findRegistrationForm();
        HospitalizationForm hospitalizationForm=service.findHospitalizationForm();

        model.addAttribute("registrationForm",registrationForm);
        model1.addAttribute("hospitalizationForm",hospitalizationForm);
        return "personalPage";
    }

}
